
package sad.visao;

import java.awt.event.ActionListener;
import java.awt.event.WindowListener;

public abstract class DialogAbstrato extends javax.swing.JDialog implements Teste{
   
    private SuporteEventos suporteEventos;

    public DialogAbstrato(java.awt.Frame parent, boolean modal) {

        initSuporteEventos();

    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents

    @Override
    public void addActionListener(ActionListener l) {
        getSuporteEventos().addActionOuvinte(l);
    }
    
    @Override
    public void removeActionListener(ActionListener l){
        getSuporteEventos().removeActionOuvinte(l);
    }
    
    @Override
    public void addWindowOuvinte(WindowListener l) {
        getSuporteEventos().addWindowOuvinte(l);
    }
    
    public SuporteEventos getSuporteEventos() {
        return suporteEventos;
    }
    
    private void initSuporteEventos() {
        suporteEventos = new SuporteEventos(this);
    }
    protected void resetDialog() {}
    protected void focusField(String field){}
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
}